<html>
    <?php
    echo $this->render("/common/header.phtml");
    ?>
    <body>
        <?php
        echo $this->render("/common/topMenu.phtml");
        ?>
        <?php
        if ($this->onDone) {
            echo '<b>Insert done</b>';
        }
        ?>
        <form action="doinsert" method="POST">
            <br>
            <div id="intro" >
                <h3 class="lbDesc">Loại quán</h3>
                <select id="type" name="type">
                <?php
                if ($this->allType != null) {
                    foreach ($this->allType as $item) {
                        echo '<option value="' . $item['id'] . '" id ="' . $item['id'] . '">' . $item['name'] . '</option>';
                    }
                }
                ?>
                </select>
            </div>
            <hr>
            <h3 class="lbDesc">General</h3>
            <div id="detail">
                <table id="gradient-style">
                    <tr>
                        <th>Name place</th>
                        <th>Phone number</th>
                        <th>Avatar</th>
                    </tr>
                    <tr>                       
                        <td><input type="text" name="placeName" value=""/></td>
                        <td><input type="text" name="placePhone" value="" /></td>
                        <td><input type="text" name="avatarLink" value="" /></td>
                    </tr>                    
                </table>
            </div>   
            <div id="address">               
                <table id="gradient-style" style="width: 90%">
                    <tr>
                        <th>Info</th>
                        <th>Number</th>
                        <th>Ward</th>
                        <th>Street</th>
                    </tr>  
                    <td><input type="text" name="info" value=""/></td>
                    <td><input type="text" name="addressNumber" value="No"/></td>
                    <td>
                        <select id="site"  name="site">
                            <?php
                            if ($this->allSite != null) {
                                foreach ($this->allSite as $item) {
                                    echo '<option value="' . $item['id'] . '" id ="' . $item['id'] . '">' . $item['name'] . '</option>';
                                }
                            }
                            ?>
                        </select>
                    </td>
                    <td><input type="text" name="addressStreet" value="No"/></td>
                    <tr>
                        <th>Ward</th>
                        <th>Lon</th>
                        <th>Lat</th>     
                        <th>Description</th>    
                    </tr>
                                    
                        <td><input type="text" name="addressWard" value="No"/></td>
                        <td><input type="text" name="addressLon" value=""/></td>
                        <td><input type="text" name="addressLat" value=""/></td>
                        <td><textarea id="addressDescription" cols="40" rows ="5" style="width: 100%" name="addressDescription"></textarea></td>
                                  
                </table>


            </div> 
            <hr>
            <div id="menu">
                <b class="lbDesc">Menu</b>                     
                <b class="lbDesc">Insert menu :</b><br>
                Ví dụ : Thức ăn:Chả giò-12.000#Cơm Tấm-25000#Bún Bò-25000#Chim Nướng-52000;Đồ uống:Cafe-12000#Cam ép-23000#Cacao-12000 ....
                <br>
                <textarea id="menuDetail" cols="40" rows ="5" style="width: 100%" name="menuDetail" >Not ready</textarea>
            </div> 
            <hr>
            <div id="review">
                <b class="lbDesc">Review</b>                     
                <b class="lbDesc">Insert review :</b><br>
                Ví dụ : Block1#Block2#Block3...
                <br>
                <textarea id="reviewContent" cols="40" rows ="5" style="width: 100%" name="reviewContent"></textarea>
            </div>

            <div id="image">
                <b class="lbDesc">Image</b>
                <b class="lbDesc">Insert Image list :</b><br>
                Ví dụ : Block1,Block2,Block3...
                <br>
                <textarea id="imageLinks" cols="40" rows ="5" style="width: 100%"  name="imageLinks" ></textarea>
            </div>

            <div id="map">
                <b class="lbDesc">Map</b>
                <b class="lbDesc">Insert Map Image:</b><br>
                Ví dụ : "http://mappery.com/maps/Saigon-Map.mediumthumb.gif"
                <br>
                <input type="text" name="mapLink" style="width: 100%" value=""/><br>
            </div>
            <hr>

            <input type="submit" value="Insert new this Place" style="padding-left: 0.5em " >
        </form>
    </body>

</html>
